#pragma once

#include <memory>
#include "TrueText/Types.h"
#include "BlittingFunction.h"

namespace TrueText {

class BitmapInfo;
class BlittingFunction;

class BitmapLayer
{
public:
	BitmapLayer();
	virtual ~BitmapLayer();

	virtual void Render(const BitmapInfo& output) const = 0;
	virtual std::auto_ptr<BitmapLayer> Clone() const = 0;
	
	const Point& GetOffset() const { return offset; } 
	void SetOffset(const Point& value) { offset = value; }

	// Blitting function is mutable so feel free to adjust its parameters with constructions like GetBlittingFunction().SetColor(...)
	const BlittingFunction& GetBlittingFunction() const;
	void SetBlittingFunction(const BlittingFunction& fn);
private:
	BlittingFunction blittingFunction;
	Point offset;
};

}